<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fm" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>中林-首页</title>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/style.css" />
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/index.css" />
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/zhonglin.js"></script>
</head>
<body>
<!--top 开始-->
    <div class="top">
        <div class="top-con w1200">
            <p class="t-con-l f-l">您好，
                <c:if test="${not empty user}">
                    ${user.username}
                </c:if>
                欢迎来到宅客微购</p>
            <ul class="t-con-r f-r">

                <c:choose>
                    <c:when test="${not empty user}">
                        <li><a href="${pageContext.request.contextPath}/user/toUserDetail.action?id=${user.id}">我 (个人中心)</a></li>
                    </c:when>
                    <c:otherwise>
                        <li><a href="${pageContext.request.contextPath}/user/toLogin.action">我 (个人中心)</a></li>
                    </c:otherwise>
                </c:choose>



                <%--<li><a href="${pageContext.request.contextPath}/user/toPersonal.action?id =${user.id}">我 (个人中心)</a></li>--%>
                <li><a href="#">我的购物车</a></li>
                <li><a href="#">我的订单</a></li>
                <li class="erweima">
                    <a href="#">扫描二维码</a>
                    <div class="ewm-tu">
                        <a href="#"><img src="<%=request.getContextPath()%>/images/erweima-tu.jpg" /></a>
                    </div>
                </li>
                <div style="clear:both;"></div>
            </ul>
            <div style="clear:both;"></div>
        </div>
    </div>
</body>
</html>